<?php

Route::match(['get','post'],'login','User\SignController@login');// 登录

Route::match(['get','post'],'upload/image','CommonController@uploadImage');// 图片上传
Route::match(['get','post'],'test','System\NavController@test');// test

Route::group(['middleware'=>'admin_auth','as'=>'admin.'],function () {
    /** 基础页 */
    Route::match(['get','post'],'home','Home\HomeController@home');//报表
    Route::match(['get','post'],'','Home\HomeController@index');//框架


    /** 基础设置 */
    Route::match(['get','post'],'banner/index','Setting\BannerController@index');// banner列表
    Route::match(['get','post'],'banner/edit','Setting\BannerController@edit');// banner编辑
    Route::match(['get','post'],'banner/sort','Setting\BannerController@sort');// banner排序
    Route::match(['get','post'],'banner/del','Setting\BannerController@del');// banner删除
    Route::match(['get','post'],'banner/status','Setting\BannerController@status');// 上架/下架

    Route::match(['get','post'],'version/index','Setting\VersionController@index');// 更新记录
    Route::match(['get','post'],'version/edit','Setting\VersionController@edit');// 添加更新

    Route::match(['get','post'],'opinion/index','Setting\OpinionController@index');// 意见列表
    Route::match(['get','post'],'opinion/check','Setting\OpinionController@check');// 处理

    Route::match(['get','post'],'links/index','Setting\LinksController@index');// 友链列表
    Route::match(['get','post'],'links/edit','Setting\LinksController@edit');// 编辑
    Route::match(['get','post'],'links/status','Setting\LinksController@status');// 上架/下架


    /** 文章管理 */
    Route::match(['get','post'],'article/index','Posts\ArticleController@index');// 文章列表
    Route::match(['get','post'],'article/edit','Posts\ArticleController@edit');// 文章编辑
    Route::match(['get','post'],'article/comment','Posts\ArticleController@comment');// 评论帖子
    Route::match(['get','post'],'article/del','Posts\ArticleController@del');// 文章删除

    Route::match(['get','post'],'comment/index','Posts\CommentController@index');// 评论列表
    Route::match(['get','post'],'comment/edit','Posts\CommentController@edit');// 评论编辑
    Route::match(['get','post'],'comment/del','Posts\CommentController@del');// 评论删除

    Route::match(['get','post'],'cates/index','Posts\CatesController@index');// 评论列表
    Route::match(['get','post'],'cates/edit','Posts\CatesController@edit');// 评论编辑
    Route::match(['get','post'],'cates/sort','Posts\CatesController@sort');// 评论排序
    Route::match(['get','post'],'cates/del','Posts\CatesController@del');// 评论删除

    /** 会员管理 */
    Route::match(['get','post'],'user/index','User\UserController@index');// 会员列表
    Route::match(['get','post'],'user/edit','User\UserController@edit');// 会员编辑


    /** 图集 */
    Route::match(['get','post'],'images/index','Images\ImagesController@index');// 图集列表
    Route::match(['get','post'],'images/edit','Images\ImagesController@edit');// 图集编辑
    Route::match(['get','post'],'images/save','Images\ImagesController@save');// 图集保存
    Route::match(['get','post'],'images/detail','Images\ImagesController@detail');// 图集详情


    /** 文档 */
    Route::match(['get','post'],'doc/index','Docs\DocsController@index');// 文档列表
    Route::match(['get','post'],'doc/edit','Docs\DocsController@edit')->name('doc.edit');// 文档新增/编辑
    Route::match(['get','post'],'doc/edit/save','Docs\DocsController@editSave')->name('doc.edit.save');// 文档新增/编辑

    Route::match(['get','post'],'doc/info/index','Docs\DocsInfoController@index');// 文档详情
    Route::match(['get','post'],'doc/info/add/version','Docs\DocsInfoController@addVersion');// 添加版本
    Route::match(['get','post'],'doc/info/add/list','Docs\DocsInfoController@addList');// 添加目录
    Route::match(['get','post'],'doc/info/edit/detail','Docs\DocsInfoController@editDetail');// 编辑内容
    Route::match(['get','post'],'doc/info/del','Docs\DocsInfoController@delDetail');// 删除内容


    /** 授权管理 */
    Route::match(['get','post'],'admin/index','Auth\AdminController@index');// 管理员
    Route::match(['get','post'],'admin/edit','Auth\AdminController@edit');// 添加账号
    Route::match(['get','post'],'admin/reset','Auth\AdminController@reset');// 密码重置

    Route::match(['get','post'],'role/index','Auth\RoleController@index');// 角色管理
    Route::match(['get','post'],'role/edit','Auth\RoleController@edit');// 添加角色
    Route::match(['get','post'],'role/del','Auth\RoleController@del');// 分配权限


    /** 系统管理 */
    Route::match(['get','post'],'nav/index','System\NavController@index');// 导航管理
    Route::match(['get','post'],'nav/edit','System\NavController@edit');// 导航编辑
    Route::match(['get','post'],'nav/del','System\NavController@del');// 导航删除
    Route::match(['get','post'],'nav/sort','System\NavController@sort');// 导航排序




    Route::get('logout', 'User\SignController@logout')->name('logout');// 退出登录
});

